Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Does this environment have the ability to get the [[Prototype]] of an object on creation with `__proto__`?
Does this environment have the ability to set the [[Prototype]] of an object on creation with __proto__
?
var hasProto = require('has-proto');
var assert = require('assert');
assert.equal(typeof hasProto(), 'boolean');
var hasProtoAccessor = require('has-proto/accessor')();
if (hasProtoAccessor) {
assert.equal([].__proto__, Array.prototype);
} else {
assert(!('__proto__' in Object.prototype));
}
var hasProtoMutator = require('has-proto/mutator');
var obj = {};
assert('toString' in obj);
obj.__proto__ = null;
if (hasProtoMutator) {
assert(!('toString' in obj));
} else {
assert('toString' in obj);
assert.equal(obj.__proto__, null);
}
Simply clone the repo, npm install
, and run npm test
FAQs
Does this environment have the ability to get the [[Prototype]] of an object on creation with `__proto__`?
The npm package has-proto receives a total of 31,090,863 weekly downloads. As such, has-proto popularity was classified as popular.
We found that has-proto demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.